package com.hm.jiaowuxitong.dao;
import com.hm.jiaowuxitong.util.DBUtil;
import java.util.List;
import java.util.Map;

public class AdminDaoImp implements IAdminDao {
    public List<Map<String, Object>> HselectAdmin(String id){
        return DBUtil.jt.queryForList("select * from loginAdmin where id=?",id);
    }
    public int HinsertAdmin(Map<String, Object> oMap) {
        return DBUtil.jt.update("insert into loginTeacher values(?,?)",
                new Object[]{
                        oMap.get("id"),
                        oMap.get("key"),
                });
    }

    @Override
    public int ChangeAdminPassword(Map<String, Object> oMap) {
        return DBUtil.jt.update("update loginadmin set `key`=? where id=?",
                new Object[]{
                        oMap.get("key"),
                        oMap.get("id"),
                });
    }
}
